let ListNode = function(){
    this.head = null
    this.vav = null
    this.length = 0

    let slow = head ,fast = head.next
}

let Node = function(){
    this.vav = val
    this.next = null
}

let judge = function(val){
    if(!head || !head.next)
        return null

    while(fast != slow&&slow != null&&fast != null&& fast.next != null){
        slow = slow.next
        fast = fast.next
    }

    return slow
}

//增
let add = function(val){
    let news = new Node(val)
    this.nav = news
    let adds = this.nav

    if(adds){
        adds.next = this.nav
    }

    if(!this.head){
        this.head = NodeList
        this.head.next = null
    }

    this.length++
}

//删
let remove = function(val){
    let first = new ListNode()
    let cur = first
    first.next = head

    while(head){
        if(head.val != val){
            head = head.next
        }
        else{
            cur.next = head
            cur = head
            head = head.next
        }
    }

    cur.next = head

    return first.next
}

//查
let find = function(val){
    let cur = this.first

    while(cur&&cur.val){
        if(cur.val == val)
            console.log(cur)

        cur = cur.next
    }

    console.log("不存在该节点！！")
}

//改
let change = function(val,news){
    let cur = this.find(val)

    if(!cur)
        console.log("不存在该节点！！")
    
    else{
        cur.val = news
    }
}
